﻿<%@ Register TagPrefix="mwc" Namespace="MySoft.WebControls" Assembly="MySoft.WebControls" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="BizParamSetting_Import_Right.aspx.vb" Inherits="PubProject.BizParamSetting_Import_Right"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title></title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<LINK href="/_grid/grid.css" type="text/css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<link rel="stylesheet" type="text/css" href="/_nav/taskbox.css">
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/PubProject/js/Public.js"></script>
		<script language="javascript" src="BizParamSetting_Option.js"></script>
		<script language="javascript">
            window.onload = function()
            {
                var i, j, k;
	
	            var maxClass = 1;  //最大级数
            	
	            objTable = Table1;
	            iNamePos = 0;
            		
	            //显示a_strGUID的层次关系
	            for(i=1;i<objTable.rows.length;i++)
	            {	
		            applyStyle(objTable.rows[i], "gridSelectOff");
            		
		            j = objTable.rows[i].ParamCode.split(".").length - 1;
            		
		            //记录最大级数
		            if(j+1>maxClass) maxClass = j+1;
            		
		            if(objTable.rows.length>i+1)
		            {
			            if(objTable.rows[i+1].ParamCode.split(".").length<=j+1)
				            objTable.rows[i].cells[iNamePos].children[1].innerText = "   ";
			            else
				            objTable.rows[i].cells[iNamePos].children[1].innerText = "[-]";
		            }
		            else
			            objTable.rows[i].cells[iNamePos].children[1].innerText = "   ";
		            for(k=0;k<j;k++)
			            objTable.rows[i].cells[iNamePos].children[0].innerText += "　　";
            		
	            }
            	
	            //当级数超过5时动态维护显示级别菜单
	            if(maxClass>2)
	            {
		            var a,objRow;
		            for(a=3;a<=maxClass;a++)
		            {
			            objRow = AppGridMenu1_mainmnu.insertRow(a-1);
			            objRow.action="showLevel(" + a + ")";
            			
			            var objCell;
			            objCell = objRow.insertCell(0);
			            objCell.innerText = " ";
            			
			            objCell = objRow.insertCell(1);
			            objCell.innerText = "显示" + a + "级";
			            objCell.colspan = 2
		            }
	            }
            	
	            //默认选中第一行
	            if(objTable.rows.length>1)
	            {
		            lastObj = objTable.rows[1];
		            //onTrClick(lastObj);
		            applyStyle(lastObj, "gridSelectOn");

	            }

            	
	            //此操作可避免出现第一次点某级无法展开下级的问题
	            showLevel(maxClass);
            }
		</script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table style="TABLE-LAYOUT: fixed" height="100%" width="100%" cellspacing="0" cellpadding="0">
					<tr height="25">
						<td>
							<table width="100%">
								<tr>
									<td >
										<asp:Label ID="lblParamName" runat="server" Font-Size="12px" ForeColor="MidnightBlue" Font-Bold="True">参数选项</asp:Label>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr height="25">
						<td>
							<mnu:AppGridMenu id="AppGridMenu1" runat="server"></mnu:AppGridMenu>
						</td>
					</tr>
					<tr>
						<td vAlign="top">
							<DIV style="OVERFLOW:auto; WIDTH:100%; HEIGHT:100%;background-color:white" id="dv1" >
								<mwc:repeater id="repParam" runat="server" SortSignDESC='<img src="/_imgs/ico_arrow_d.gif">'
									SortSignASC='<img src="/_imgs/ico_arrow_u.gif">' PKField="ParamCode" LinkAlign="right" LinkCssClass="a1"
									FooterCssClass="footer" EnablePager = "false">
									<HeaderTemplate>
										<TABLE id="Table1" cellspacing="0" cellpadding="0" width="100%" class="gridBar1">
											<tr align='center' height='22'>
												<td class="gridBar"><nobr>选项</nobr></td>
												<td width="200" class="gridBar"><nobr>编码</nobr></td>
												<td width="100" class="gridBar"><nobr>是否系统级</nobr></td>
											</tr>
									</HeaderTemplate>
									<ItemTemplate>
										<tr height = '20'  trid='<%# DataBinder.Eval(Container, "DataItem.id") %>'  
														ParamCode='<%# DataBinder.Eval(Container.DataItem, "ParamCode") %>' 
														clevel='<%# DataBinder.Eval(Container.DataItem, "ParamLevel") %>' 
														ifend='<%# DataBinder.Eval(Container.DataItem, "IfEnd") %>' 
														ifsys='<%# DataBinder.Eval(Container.DataItem, "IfSys") %>' 
														ParamGUID='<%# DataBinder.Eval(Container.DataItem, "ParamGUID") %>' 
														is_hide="false" onclick="onTrClick(this)">
											<td style="cursor:hand;"><span></span><label style="CURSOR: hand" onclick="doExp(this);"></label><%# DataBinder.Eval(Container.DataItem, "ParamValue") %></td>
											<td style="cursor:hand;"><%# DataBinder.Eval(Container.DataItem, "ParamCode") %></td>
											<td style="cursor:hand;"><%# iif(DataBinder.Eval(Container.DataItem, "IfSys")=true,"是","&nbsp;") %></td>
										</tr>
									</ItemTemplate>
									<FooterTemplate>
										</table>
									</FooterTemplate>
								</mwc:repeater>
							</DIV>
						</TD>
					</TR>
				</TABLE>	
		</form>
	</body>
</HTML>

